﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Logistics_Management_System.Cargo
{
    public class Cargo_Repository : ServiceBase
    {
        public LG_Cargoe GetCargoById(int cargo_id)
        { return (from cargo in this.DB.LG_Cargoes where cargo.Id == cargo_id select cargo).FirstOrDefault<LG_Cargoe>(); }

        public List<LG_Cargoe> GetCargoesByOrderId(int ord_id)
        { return (from cargoes in this.DB.LG_Cargoes where cargoes.Order_Id == ord_id select cargoes).ToList<LG_Cargoe>(); }
    }
}